const i18nAction = [
  {
    id: 'languageServer.next',
    name: '下一种语言',
    type: 'language',
    exec: (app) => {
      app.languageServer.next()
    }
  },
  {
    id: 'languageServer.prev',
    name: '上一种语言',
    type: 'language',
    exec: (app) => {
      app.languageServer.prev()
    }
  },
  {
    id: 'languageServer.setLang',
    name: '设置语言',
    type: 'language',
    exec: (app, params) => {
      const result = params[0]
      switch (result) {
        case '中文':
        case '汉语':
          app.languageServer.setLang('zh-CN')
          break
        case '英语':
        case '英文':
        case '外语':
          app.languageServer.setLang('en-US')
          break
        default:
          app.languageServer.addWarn('Invalid language')
      }
    }
  }
]
export default i18nAction
